# -*- encoding:utf-8 -*-
# !/usr/bin/env python
'''
    python-0811-03.py
    ======================
    @descript: 指定内容相同的规则
    @copyright:nnz
    @author:dln
    @date: 2021/8/11 17:37
    @version:v1.0
'''
class A:
    def __init__(self,p1,p2):
        self.v_01=p1
        self.v_02=p2
    pass
    def __eq__(self, other):
        v_result=self.v_01==other.v_01 and self.v_02==other.v_02
        return v_result
    def __hash__(self):
        return hash(self.v_01)
    pass




v_object01=A(1,3)
v_object02=A(1,2)
if v_object01==v_object02:
    print('对象相同')
else:
    print('对象不同')